﻿@using Resources;
@model sipfe.model.dataAccess.SIPMaeConvocatoria
<script type="text/javascript" src="@Url.Content(@properties.nuevoJS)" ></script>
<script type="text/javascript">
    $(function () {
        setAutoAyudaEmpresa("#nIdeEmpresa", "#nIdeCodPaisDoc", "#nIdeTipoDocum", "#vNumDocum", "#vNombres", "/AutoAyuda/ListaEmpresaAuto", "1");
        setAutoAyudaEmpresa("#nIdeEmpresa", "#nIdeCodPaisDoc", "#nIdeTipoDocum", "#vNombres", "#vNumDocum", "/AutoAyuda/ListaEmpresaAuto", "2");
        inicioPopPupModal("#divTarifario", 500, 950, "REGISTROS ENCONTRADOS EN EL TARIFARIO");
        calendarioFuturo1('dFecIniVig', '0');
        calendarioFuturo1('dFecFinVig', '0');
    });
</script>
@using (Html.BeginForm("AddNuevaConvocatoria", "Convocatoria", FormMethod.Post))
{   
    <br />
    <fieldset>
        <legend><span>Datos Generales de la Convocatoria</span></legend>
        <table>
            <tr>
                <td>Clase de Solicitud<span class="asterisco">(*)</span></td>
                <td>Inicio de Vigencia<span class="asterisco">(*)</span></td>
                <td>Fin de Vigencia</td>
                <td>Tipo Convocatoria<span class="asterisco">(*)</span></td>
                <td># Total Becas<span class="asterisco">(*)</span></td>
            </tr>
            <tr>
                <td>@Html.DropDownList("nIdeClaseSol", (IEnumerable<SelectListItem>)ViewBag.ClaseTramite, "--Seleccione--")</td>
                <td>@Html.TextBox("dFecIniVig", null, new { style = "width:60px;", maxlength = 10, onkeyup="javascript:setFechaCaja(this);", onkeypress = "return validarCharFecha(event);", onblur="javascript:ValDateTextNew(this);" }) </td>
                <td>@Html.TextBox("dFecFinVig", null, new { style = "width:60px;", maxlength = 10, onkeyup="javascript:setFechaCaja(this);", onkeypress = "return validarCharFecha(event);", onblur="javascript:ValDateTextNew(this);" })</td>
                <td>@Html.DropDownList("nIdeTipoConvo", (IEnumerable<SelectListItem>)ViewBag.TipoConvocatoria, "--Seleccione--")</td>
                <td>@Html.TextBox("nCantTotaBeca", null, new { style = "width:40px;", maxlength = 4, onkeypress = "return validarSoloNumeros(event);" })</td>
            </tr>
            <tr>
                <td colspan="5">Descripción<span class="asterisco">(*)</span></td>
            </tr>
            <tr>
                <td colspan="5">@Html.TextArea("vDescr", null, new { style = "width:770px;height:50px;", onblur = "javascript:onBlurUpper(this);", maxlength = 450, ondblclick = "javascript:cleanBox(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 450);" })</td>
            </tr>
        </table>
    </fieldset>

    <br /><br />
    <fieldset>
        <legend><span>Datos Adicionales de la Convocatoria</span></legend>
        <table class="tablaInput2" id="rpp" border="1">
        <tbody id="tbody1">
        <tr id="tr1">
            <td class="bg1" id="tdDiv1">
                <div id="divPag2">1</div>
                <input type="hidden"  id="inputPag2" name="inputPag2"  value="1"/>
            </td>
            <td id="td1">
                <table class="tablaInput3" id="merry">
                    <tr id="trDuplicar">
                        <td>
                            <table class="tablaInput3" id="francisco">
                            <tbody class="center">
                                <tr>
                                    <td>País Emisor<span class="asterisco">(*)</span></td>
                                    <td>Tipo documento<span class="asterisco">(*)</span></td>
                                    <td>Número documento<span class="asterisco">(*)</span></td>
                                    <td>Razón Social de la Empresa Financiadora / Gestionadora<span class="asterisco">(*)</span></td>
                                </tr>
                                <tr id="trExitosa1">
                                    <td>                                        
                                        @Html.HiddenFor(model => model.nIdeEmpresa)                                        
                                        @Html.DropDownList("nIdeCodPaisDoc", (IEnumerable<SelectListItem>)ViewBag.PaisEmisor)
                                    </td>
                                    <td>
                                        @Html.DropDownList("nIdeTipoDocum", (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--")
                                    </td>
                                    <td>
                                        @Html.TextBox("vNumDocum", null, new { style = "width:100px;", maxlength = 20 })
                                    </td>
                                    <td colspan ="3">
                                        @Html.TextBox("vNombres", null, new { style = "width:400px;", maxlength = 50, onkeypress = "return validaAlfaNumTamanio(this, event, 50);" })
                                    </td>                           
                                </tr>
                                <tr><td colspan="4"><hr /></td></tr>
                                <tr id="trDuplicar2">
                                    <td colspan="4">
                                        <table class="tablaInput4" id="fgh">
                                        <tbody>
                                            <tr id="trDuplicar3">                                                
                                                <td style="width:10px;" id="tdImg1" >
                                                    <img src="@Url.Content("~/images/borrar.gif")" class="lupita2" id="imgBorrar" alt="ELIMINAR" style="display:none" onclick="javascript:deleteConceptoInterno(this,4,2,16);"   />
                                                    <img src="@Url.Content("~/images/mas.gif")" class="lupita2" id="imgAgregar" alt="AGREGAR" onclick="javascript:clonarConceptoInterno(this,4,16);"/>
                                                </td>
                                                <td class="bg1">
                                                    <div id="divPag1">1.1</div>                                                    
                                                </td>
                                                <td>
                                                    <table class="tablaInput3" id="exitosa">
                                                    <tbody>
                                                        <tr>
                                                            <td>Nivel de Estudio<span class="asterisco">(*)</span></td>                                                            
                                                            <td>Concepto/Especialidad<span class="asterisco">(*)</span></td>
                                                            <td>Modalidad de Estudio<span class="asterisco">(*)</span></td>
                                                            <td># de becas<span class="asterisco">(*)</span></td>
                                                        </tr>
                                                        <tr id="trExitosa2">
                                                            <td>@Html.DropDownList("nIdeNivelEstudio_1", (IEnumerable<SelectListItem>)ViewBag.GrupoNIvelConvoca, "--Seleccione--", new { onchange = "javascript:cargaConcepto(this,'2');" })</td>
                                                            <td>
                                                                <div id="divConcepto">
                                                                    <select id="nIdeConcepto_1" name="nIdeConcepto_1" style="width:200px;" >
                                                                        <option value="">--Seleccione--</option>
                                                                    </select>
                                                                </div>
                                                            </td>
                                                            <td>@Html.DropDownList("nIdeModalidadEstudio_1", (IEnumerable<SelectListItem>)ViewBag.ModalidadEstudio, "--Seleccione--")</td>
                                                            <td>
                                                                @Html.TextBox("nNumeroBeca_1", null, new { style = "width:40px;", maxlength = 4, onkeypress = "return validarSoloNumeros(event);" })                                                                
                                                            </td>
                                                        </tr>
                                                    </tbody>
                                                    </table>
                                                </td>                                                
                                            </tr>
                                        </tbody>
                                        </table>
                                    </td>
                                </tr>
                            </tbody>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>            
            <td style="width:10px;" id="imgPrincipal">
                <img src="@Url.Content("~/images/borrar.gif")" class="lupita2" alt="ELIMINARPRIN" id="imgBorrarPrincipal" style="display:none" onclick="javascript:deleteConceptoPrincipal(this,4,2);"   />
                <img src="@Url.Content("~/images/mas.gif")" class="lupita2" alt="AGREGARPRIN"  id="imgAgregarPrincipal" onclick="javascript:clonarConceptoPrincipal(this,4);"/>
            </td>                        
        </tr>
    </tbody>
    </table>
        <table>
        <tr>
            <td style="height:30px;width:400px;">Campo Obligatorio:<span class="asterisco">(*)</span></td>
            <td><input type="button" value="Registrar" onclick="javascript: addNuevaConvocatoria(this, this.form);" /></td>
        </tr>
    </table>
     @Html.HiddenFor(model => model.nIdeUsuReg, new { Value = @Session["nIdeUsuario"] })
    </fieldset>
    <div id="divTarifario"></div>
}